(global.webpackJsonp = global.webpackJsonp || []).push([ [ "integral/detail" ], {
    "2b5e": function(t, o, e) {
        (function(t) {
            Object.defineProperty(o, "__esModule", {
                value: !0
            }), o.default = void 0;
            var i = e("a71e"), n = e("8434"), r = (p(e("03b8")), e("26cb")), a = e("7960"), s = p(e("801c")), c = e("db8f"), d = e("b806"), u = e("03c7"), f = e("9b04"), l = e("4771");
            function p(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            function g(t, o) {
                var e = Object.keys(t);
                if (Object.getOwnPropertySymbols) {
                    var i = Object.getOwnPropertySymbols(t);
                    o && (i = i.filter(function(o) {
                        return Object.getOwnPropertyDescriptor(t, o).enumerable;
                    })), e.push.apply(e, i);
                }
                return e;
            }
            function h(t) {
                for (var o = 1; o < arguments.length; o++) {
                    var e = null != arguments[o] ? arguments[o] : {};
                    o % 2 ? g(Object(e), !0).forEach(function(o) {
                        y(t, o, e[o]);
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : g(Object(e)).forEach(function(o) {
                        Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(e, o));
                    });
                }
                return t;
            }
            function y(t, o, e) {
                return o in t ? Object.defineProperty(t, o, {
                    value: e,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[o] = e, t;
            }
            var b = {
                components: {},
                computed: h(h({}, (0, r.mapGetters)([ "configs", "mainColor", "user", "iphoneXStyle", "priceColor" ])), {}, {
                    serveStyle: function() {},
                    imgboxx: function() {
                        return {
                            "background-color": "#222"
                        };
                    },
                    imgboii: function() {
                        return {
                            opacity: "0.5"
                        };
                    }
                }),
                data: function() {
                    return {
                        isExchange: !0,
                        goodID: "",
                        payData: {},
                        goodInfo: {},
                        options: [],
                        titles: [],
                        show_share: !1,
                        swiperList: [],
                        currentSwiper: 0,
                        params: {
                            type: 4,
                            id: ""
                        },
                        user_id: "",
                        isbar: "",
                        colorText: "",
                        isShow: !1,
                        goodsData: {},
                        colorBtnText: ""
                    };
                },
                created: function(t) {
                    var o = this;
                    (0, d.init)(this).then(function(t) {
                        o.isBar = t;
                    }), this.isPayType();
                },
                onHide: function() {},
                onLoad: function(t) {
                    var o = this;
                    (0, i.isEmpty)(t.pid) || s.default.commit("config/SET_PID", t.pid), (0, i.isEmpty)(decodeURIComponent(t.scene).split("pid=")[1]) || s.default.commit("config/SET_PID", decodeURIComponent(t.scene).split("pid=")[1]), 
                    this.goodID = t.id || (0, c.getPageId)(o).id, (0, l.getStorageSync)("userInfo").then(function(t) {
                        var e = JSON.parse(t.data);
                        (0, i.isEmpty)(e.id) || (o.user_id = e.id), o.getGoodInfo();
                    }, function(t) {
                        o.getGoodInfo();
                    });
                },
                onShareAppMessage: function(t) {
                    var o = (0, i.isEmpty)(this.user.id) ? 0 : this.user.id;
                    return "button" === t.from && this.$refs.BotShow.isBotShow(), {
                        title: this.goodInfo.title,
                        path: "/integral/detail?id=" + this.goodID + "&pid=" + o
                    };
                },
                onShareTimeline: function() {
                    var t = (0, i.isEmpty)(this.user.id) ? 0 : this.user.id;
                    return {
                        title: this.goodInfo.title,
                        query: "pid=" + t + "&id=" + this.goodID + "&isCircle=true",
                        imageUrl: ""
                    };
                },
                mounted: function() {
                    this.colorText = (0, c.colorRgba)(this.configs.btn2BgColor, .1), this.colorBtnText = (0, 
                    c.colorRgba)(this.mainColor, .5);
                },
                methods: {
                    action: function() {
                        (0, n.route)({
                            url: "/diy/diy/index",
                            type: 3,
                            data: {}
                        });
                    },
                    isPayType: function() {
                        var t = this;
                        (0, f.payMethod)().then(function(o) {
                            -1 == o.indexOf("wxpay") && (t.isPay = 0);
                        });
                    },
                    choosePay: function(t) {
                        this.isPay = 1 == t.typeId ? 3 : 2, this.buyVip();
                    },
                    goPay: function() {
                        (0, n.route)({
                            url: "/integral/order/putOrder",
                            type: 1,
                            data: {
                                id: this.goodID,
                                good_type: this.goodInfo.type
                            }
                        });
                    },
                    showImg: function(o, e) {
                        t.previewImage({
                            current: e,
                            urls: this.swiperList
                        });
                    },
                    getGoodInfo: function(o) {
                        var e = this, i = this;
                        this.loadingOk = !1, this.isRequest = !1;
                        var n = {
                            id: this.goodID
                        };
                        (0, u.integralGoodInfo)(n).then(function(o) {
                            i.goodInfo = o, i.params.id = o.id, o.video && e.goodInfo.imglist.unshift({
                                src: o.video,
                                type: "video"
                            }), i.spec = o.spec, e.swiperList = e.goodInfo.imglist, t.setNavigationBarTitle({
                                title: i.goodInfo.title
                            }), parseFloat(i.goodInfo.user_integral) < parseFloat(i.goodInfo.integral) && (i.isExchange = !1), 
                            e.isShow = !0;
                        });
                    },
                    buyVip: function() {
                        var t = this;
                        if (0 == t.isPay) return t.$toast("未设置支付方式", "none"), !1;
                        var o = {
                            payType: 1,
                            card_id: t.card_id
                        };
                        subVipOrder(o).then(function(o) {
                            pay(o, t.orderSuccess, t.orderFail, "");
                        });
                    },
                    orderSuccess: function() {},
                    orderFail: function() {},
                    buy: function() {
                        var t = this, o = this;
                        (0, a.h5JudgeLogin)(2).then(function(e) {
                            if (!e) {
                                if (t.goodInfo.stock <= 0) return void t.$toast("暂无库存", "none");
                                o.goPay();
                            }
                        });
                    }
                }
            };
            o.default = b;
        }).call(this, e("543d").default);
    },
    "2d04": function(t, o, e) {
        var i = e("397b");
        e.n(i).a;
    },
    "397b": function(t, o, e) {},
    "7c50": function(t, o, e) {
        e.r(o);
        var i = e("2b5e"), n = e.n(i);
        for (var r in i) "default" !== r && function(t) {
            e.d(o, t, function() {
                return i[t];
            });
        }(r);
        o.default = n.a;
    },
    "99dd": function(t, o, e) {
        e.d(o, "b", function() {
            return i;
        }), e.d(o, "c", function() {
            return n;
        }), e.d(o, "a", function() {});
        var i = function() {
            var t = this, o = (t.$createElement, t._self._c, parseFloat(t.goodInfo.integral)), e = parseFloat(t.goodInfo.price), i = parseFloat(t.goodInfo.sales), n = parseFloat(t.goodInfo.stock);
            t.$mp.data = Object.assign({}, {
                $root: {
                    m0: o,
                    m1: e,
                    m2: i,
                    m3: n
                }
            });
        }, n = [];
    },
    e501: function(t, o, e) {
        (function(t) {
            e("1067"), i(e("66fd"));
            var o = i(e("ea4c"));
            function i(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = e, t(o.default);
        }).call(this, e("543d").createPage);
    },
    ea4c: function(t, o, e) {
        e.r(o);
        var i = e("99dd"), n = e("7c50");
        for (var r in n) "default" !== r && function(t) {
            e.d(o, t, function() {
                return n[t];
            });
        }(r);
        e("2d04");
        var a = e("f0c5"), s = Object(a.a)(n.default, i.b, i.c, !1, null, "fbd7e7fa", null, !1, i.a, void 0);
        o.default = s.exports;
    }
}, [ [ "e501", "common/runtime", "common/vendor" ] ] ]);